{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>支付配置</strong></li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
			{include file="system/top"}
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('payment')}">
					<h4 style="margin: 0 20px;">支付宝手机支付</h4>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">开启支付宝：</label>
						<div class="input-group col-sm-4">
							<div class="onoffswitch">
								<input name="alipay_status" id="alipay_status" type="checkbox" {if $payment_config.alipay_status}checked{/if} class="onoffswitch-checkbox">
								<label class="onoffswitch-label" for="alipay_status">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
							</div>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">合作身份者ID：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[alipay_partner]" name="payment_config[alipay_partner]" value="{$payment_config.alipay_partner}" placeholder="合作身份者ID" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">收款支付宝账号：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[alipay_seller_id]" name="payment_config[alipay_seller_id]" value="{$payment_config.alipay_seller_id}" placeholder="收款支付宝账号" class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">MD5密钥：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[alipay_key]" name="payment_config[alipay_key]" value="{$payment_config.alipay_key}" placeholder="MD5密钥" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"></label>
						<div class="input-group col-sm-4">
							<a target="_blank" href="https://b.alipay.com/order/pidAndKey.htm">点此获取支付宝配置</a>
							&nbsp;&nbsp;&nbsp;
							<a target="_blank" href="{:url('index/payment/alipay')}">点此测试接口</a>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<h4 style="margin: 0 20px;">微信支付</h4>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">开启微信支付：</label>
						<div class="input-group col-sm-4">
							<div class="onoffswitch">
								<input name="wxpay_status" id="wxpay_status" type="checkbox" {if $payment_config.wxpay_status}checked{/if} class="onoffswitch-checkbox">
								<label class="onoffswitch-label" for="wxpay_status">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
							</div>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">微信APPID：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[wxpay_appid]" name="payment_config[wxpay_appid]" value="{$payment_config.wxpay_appid}" placeholder="微信APPID" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">微信AppSercet：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[wxpay_appsercet]" name="payment_config[wxpay_appsercet]" value="{$payment_config.wxpay_appsercet}" placeholder="微信AppSercet" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">微信商户ID：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[wxpay_mchid]" name="payment_config[wxpay_mchid]" value="{$payment_config.wxpay_mchid}" placeholder="微信商户ID" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">商户支付密钥：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[wxpay_key]" name="payment_config[wxpay_key]" value="{$payment_config.wxpay_key}" placeholder="商户支付密钥" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<h4 style="margin: 0 20px;">银联支付</h4>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">开启银联支付：</label>
						<div class="input-group col-sm-4">
							<div class="onoffswitch">
								<input name="unionpay_status" id="unionpay_status" type="checkbox" {if $payment_config.unionpay_status}checked{/if} class="onoffswitch-checkbox">
								<label class="onoffswitch-label" for="unionpay_status">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
							</div>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">银联商户ID：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="payment_config[unionpay_merId]" name="payment_config[unionpay_merId]" value="{$payment_config.unionpay_merId}" placeholder="商户支付密钥" class="form-control">
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script>
	//顶部导航
	$("#li-bar-pay").addClass("active");
	//ajax表单提交
	$(function() {
		// 表单验证
		$("#myForm").validate({
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}